package com.spsoft.vatoutinv.service.vmsfulloutinvoice.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.spsoft.vatoutinv.entity.vmsfulloutinvoice.VmsFullOutInvoiceItemsAdd;
import com.spsoft.vatoutinv.mapper.VmsFullOutInvoiceItemsAddMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spsoft.vatoutinv.service.vmsfulloutinvoice.VmsFullOutInvoiceItemsAddService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 附加要素表 服务实现类
 * </p>
 *
 * @author chenxudong
 * @since 2023-11-30
 */
@Service
public class VmsFullOutInvoiceItemsAddServiceImpl extends ServiceImpl<VmsFullOutInvoiceItemsAddMapper, VmsFullOutInvoiceItemsAdd> implements VmsFullOutInvoiceItemsAddService {

    @Override
    public List<VmsFullOutInvoiceItemsAdd> getInvoiceAddInfoByFoidid(Long foidid) {
        // 根据 foidid 获取发票附加要素信息
        LambdaQueryWrapper<VmsFullOutInvoiceItemsAdd> query = new LambdaQueryWrapper<>();
        query.eq(VmsFullOutInvoiceItemsAdd::getFoidid, foidid);
        query.orderByAsc(VmsFullOutInvoiceItemsAdd::getFjid);
        return list(query);
    }
}
